home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 October
/
Chip_2004-10_cd1.bin
/
software
/
stahuj
/
prog
/
pdfdemo.exe
/
{app}
/
pdffileExe.bas
< prev
next >
Wrap
BASIC Source File
|
2000-10-08
|
831b
|
31 lines
Attribute VB_Name = "pdffileExe"
Public FileSys As New FileSystemObject
Public strScriptFilePath As String
Public strPDFFilePath As String
Public bolScriptNeedsSaving As Boolean
Public Function FormatFileName(strFileName As String) As String
' If the user didn't enter a pdf file for output then
' use a default value
If Trim(strFileName) = "" Then
strFileName = App.Path & "\PDFOut.pdf"
End If
' If the length of the file is less than 4 then there
' cannot be a ".pdf" extension (or the path name is bad)
If Len(strFileName) < 4 Then
strFileName = strFileName & ".pdf"
End If
strFileName = FileSys.GetAbsolutePathName(strFileName)
If Mid$(strFileName, Len(strFileName) - 3, 4) <> ".pdf" Then
strFileName = strFileName & ".pdf"
End If
FormatFileName = strFileName
End Function